package com.itheima.singledemo;

/**
 * 2025/4/19 9:35
 */
public class TestSingleton {

    public static void main(String[] args) {
        //创建Singleton类的对象
//        new Singleton();
        //获取Singleton类的对象
        Singleton instance = Singleton.getInstance();
        Singleton instance2 = Singleton.getInstance();
        System.out.println(instance == instance2);//true

    }
}
